#ifndef _LADSUTIL_LAZY_RANDOM_SELECTOR_H
#define _LADSUTIL_LAZY_RANDOM_SELECTOR_H

#include "LADSUtil/lazy_selector.h"
#include "LADSUtil/RandGen.h"

namespace LADSUtil {

  //a lazy random selector without replacement -
  //lets you select m random integers in [0,n) without replacement each in O(1)
  //and only uses O(m) memory - useful where n is much larger than m
  struct lazy_random_selector : public lazy_selector {
    lazy_random_selector(int n, LADSUtil::RandGen& _rng) : lazy_selector(n), rng(_rng) { }
    int select();
  private:
    LADSUtil::RandGen& rng;
  };

} //~namespace LADSUtil

#endif
